package com.wang.admin.service;

import com.wang.admin.api.model.AdLabel;
import com.wang.admin.mapper.AdLabelMapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * AdLabel 频道名称标签管理
 *
 * @author WN
 * @date：2024/03/06 20:49
 */
@Service
@Slf4j
@RequiredArgsConstructor
@Transactional
public class AdLabelService {

    private final AdLabelMapper adLabelMapper;

    /**
     * 新增label
     *
     * @param adLabel
     */
    public Integer add(AdLabel adLabel) {
        adLabelMapper.insert(adLabel);
        return adLabel.getId();
    }

}
